const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,                                    //设备型号
  token: state => state.user.token,                                     //通讯令牌
  avatar: state => state.user.avatar,                                   //头像
  name: state => state.user.name,                                       //用户名
  roles: state => state.user.roles,                                     //角色、权限
  baseLayers: state => state.user.baseLayers,                           //基础底图
  dept: state => state.user.dept,                                        //所属部门
  id:state=>state.user.id,
  auth: (state) => (str) => {
      return state.user.roles.indexOf('admin') > -1 || state.user.roles.indexOf(str) > -1;
  },
}
export default getters
